<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8"/>
    <title>厅干部平时考核管理系统</title>
    <link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/main.css'/>"/>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery-1.11.0.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/layer/layer.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery.form.js'/>"></script>

</head>

<body>
<div class="njga" style="overflow: auto;">
    <div class="bmkhcp" id="bmkhcp">
        <div class="bmkhcp_lf" id="bmkhcp_lf">
            <div class="title">部门考核</div>
            <form action="<c:url value="/evaluation/leaderEvaluation.json"/>" method="post" id="submit_form">
                <input type="hidden" name="dbid" value="${data.dbid}"/>
                <input type="hidden" name="status" value="1"/>
                <table class="table_bmkhcp">
                    <tr>
                        <td width="120px">被考核人</td>
                        <td>${data.name}</td>
                    </tr>
                    <tr>
                        <c:if test="${type=='0'}"><td>考核月份</td><td>${data.months}月</td></c:if>
                        <c:if test="${type=='1'}"><td>考核季度</td><td>${data.months}季度</td></c:if>
                    </tr>
                    <tr>
                        <td>工作总结</td>
                        <td>${data.summary }</td>
                    </tr>
                    <tr>
                        <td>自我评价</td>
                        <td class="td_last">
                            <div class="td_row">
                                <div class="block block1">
                                    <span>德</span>
                                    <span>${data.selflevel1}</span>
                                </div>
                                <div class="block">
                                    <span>能</span>
                                    <span>${data.selflevel2}</span>
                                </div>
                                <div class="block block1">
                                    <span>勤</span>
                                    <span>${data.selflevel3}</span>
                                </div>
                                <div class="block">
                                    <span>绩</span>
                                    <span>${data.selflevel4}</span>
                                </div>
                                <div class="block block1">
                                    <span>廉</span>
                                    <span>${data.selflevel5}</span>
                                </div>
                                <div class="block">
                                    <span>请假</span>
                                    <span>${data.leave}</span>
                                </div>
                                <div class="block block1">
                                    <span>迟到</span>
                                    <span>${data.late}</span>
                                </div>
                                <div class="block">
                                    <span>早退</span>
                                    <span>${data.earlier}</span>
                                </div>
                                <div class="block block1">
                                    <span>缺勤</span>
                                    <span>${data.absenteeism}</span>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="ldpj">领导评鉴
                    <div class="kqjl" id="kqjl">考勤记录</div>
                </div>
                <table class="ldpj_table">
                    <tr>
                        <td width="275px" class="ldpj_table_td">
                            <div class="text">德</div>
                            <input type="hidden" name="ldeaderlevel1" id="ldeaderlevel1" value="${data.ldeaderlevel1}"/>
                            <input type="hidden" name="ldeaderlevel2" id="ldeaderlevel2" value="${data.ldeaderlevel2}"/>
                            <input type="hidden" name="ldeaderlevel3" id="ldeaderlevel3" value="${data.ldeaderlevel3}"/>
                            <input type="hidden" name="ldeaderlevel5" id="ldeaderlevel5" value="${data.ldeaderlevel5}"/>
                            <input type="hidden" name="ldeaderlevel4" id="ldeaderlevel4" value="${data.ldeaderlevel4}"/>
                            <input type="hidden" name="ldeadersocre1" id="ldeadersocre1" value="${data.ldeadersocre1}"/>
                            <input type="hidden" name="ldeadersocre2" id="ldeadersocre2" value="${data.ldeadersocre2}"/>
                            <input type="hidden" name="ldeadersocre3" id="ldeadersocre3" value="${data.ldeadersocre3}"/>
                            <input type="hidden" name="ldeadersocre4" id="ldeadersocre4" value="${data.ldeadersocre4}"/>
                            <input type="hidden" name="ldeadersocre5" id="ldeadersocre5" value="${data.ldeadersocre5}"/>
                            <input type="hidden" name="totalscore" id="totalscore" value="${data.totalscore}"/>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel1=='A'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('1','A');"></div>
                                <div class="inpt_w_r">A</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel1=='B'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('1','B');"></div>
                                <div class="inpt_w_r">B</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel1=='C'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('1','C');"></div>
                                <div class="inpt_w_r">C</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel1=='D'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('1','D');"></div>
                                <div class="inpt_w_r">D</div>
                            </div>
                        </td>
                        <td width="110px">
                            <div class="td_select">
                                <div class="td_select1">
                                    <c:choose>
                                        <c:when test="${data.ldeadersocre1 ==''||data.ldeadersocre1 ==null }">
                                            <p id="chooseId1">请选择</p>
                                        </c:when>
                                        <c:otherwise>
                                            <p id="chooseId1">${data.ldeadersocre1}分</p>
                                        </c:otherwise>
                                    </c:choose>
                                    <div class="arrow_down"></div>
                                </div>
                                <ul class="td_select_xl" id="td_select_xl1">
                                    <li>10分</li>
                                    <li>20分</li>
                                    <li>30分</li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <input type="text" class="td_inpt" placeholder="备注说明" name="remark1" id="remark1"
                                   value="${data.remark1}"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="275px" class="ldpj_table_td">
                            <div class="text">能</div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel2=='A'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('2','A');"></div>
                                <div class="inpt_w_r">A</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel2=='B'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('2','B');"></div>
                                <div class="inpt_w_r">B</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel2=='C'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('2','C');"></div>
                                <div class="inpt_w_r">C</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel2=='D'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('2','D');"></div>
                                <div class="inpt_w_r">D</div>
                            </div>
                        </td>
                        <td width="110px">
                            <div class="td_select">
                                <div class="td_select1">
                                    <c:choose>
                                        <c:when test="${data.ldeadersocre2 ==''||data.ldeadersocre2 ==null }">
                                            <p id="chooseId2">请选择</p>
                                        </c:when>
                                        <c:otherwise>
                                            <p id="chooseId2">${data.ldeadersocre2}分</p>
                                        </c:otherwise>
                                    </c:choose>
                                    <div class="arrow_down"></div>
                                </div>
                                <ul class="td_select_xl" id="td_select_xl2">
                                    <li>10分</li>
                                    <li>20分</li>
                                    <li>30分</li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <input type="text" class="td_inpt" placeholder="备注说明" name="remark2" id="remark2"
                                   value="${data.remark2}"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="275px" class="ldpj_table_td">
                            <div class="text">勤</div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel3=='A'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('3','A');"></div>
                                <div class="inpt_w_r">A</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel3=='B'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('3','B');"></div>
                                <div class="inpt_w_r">B</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel3=='C'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('3','C');"></div>
                                <div class="inpt_w_r">C</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel3=='D'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('3','D');"></div>
                                <div class="inpt_w_r">D</div>
                            </div>
                        </td>
                        <td width="110px">
                            <div class="td_select">
                                <div class="td_select1">
                                    <c:choose>
                                        <c:when test="${data.ldeadersocre3 ==''||data.ldeadersocre3 ==null }">
                                            <p id="chooseId3">请选择</p>
                                        </c:when>
                                        <c:otherwise>
                                            <p id="chooseId3">${data.ldeadersocre3}分</p>
                                        </c:otherwise>
                                    </c:choose>
                                    <div class="arrow_down"></div>
                                </div>
                                <ul class="td_select_xl" id="td_select_xl3">
                                    <li>10分</li>
                                    <li>20分</li>
                                    <li>30分</li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <input type="text" class="td_inpt" placeholder="备注说明" name="remark3" id="remark3"
                                   value="${data.remark3}"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="275px" class="ldpj_table_td">
                            <div class="text">绩</div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel4=='A'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('4','A');"></div>
                                <div class="inpt_w_r">A</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel4=='B'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('4','B');"></div>
                                <div class="inpt_w_r">B</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel4=='C'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('4','C');"></div>
                                <div class="inpt_w_r">C</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel4=='D'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('4','D');"></div>
                                <div class="inpt_w_r">D</div>
                            </div>
                        </td>
                        <td width="110px">
                            <div class="td_select">
                                <div class="td_select1">
                                    <c:choose>
                                        <c:when test="${data.ldeadersocre4 ==''||data.ldeadersocre4 ==null }">
                                            <p id="chooseId4">请选择</p>
                                        </c:when>
                                        <c:otherwise>
                                            <p id="chooseId4">${data.ldeadersocre4}分</p>
                                        </c:otherwise>
                                    </c:choose>
                                    <div class="arrow_down"></div>
                                </div>
                                <ul class="td_select_xl" id="td_select_xl4">
                                    <li>请选择1</li>
                                    <li>请选择2</li>
                                    <li>请选择3</li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <input type="text" class="td_inpt" placeholder="备注说明" name="remark4" id="remark4"
                                   value="${data.remark4}"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="275px" class="ldpj_table_td">
                            <div class="text">廉</div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel5=='A'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('5','A');"></div>
                                <div class="inpt_w_r">A</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel5=='B'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('5','B');"></div>
                                <div class="inpt_w_r">B</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel5=='C'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('5','C');"></div>
                                <div class="inpt_w_r">C</div>
                            </div>
                            <div class="inpt_w">
                                <div class="inpt_w_l <c:if test="${data.ldeaderlevel5=='D'}">inpt_w_l_hov</c:if>"
                                     onclick="javascript:selectLevel('5','D');"></div>
                                <div class="inpt_w_r">D</div>
                            </div>
                        </td>
                        <td width="110px">
                            <div class="td_select">
                                <div class="td_select1">
                                    <c:choose>
                                        <c:when test="${data.ldeadersocre5 ==''||data.ldeadersocre5 ==null }">
                                            <p id="chooseId5">请选择</p>
                                        </c:when>
                                        <c:otherwise>
                                            <p id="chooseId5">${data.ldeadersocre5}分</p>
                                        </c:otherwise>
                                    </c:choose>
                                    <div class="arrow_down"></div>
                                </div>
                                <ul class="td_select_xl" id="td_select_xl5">
                                    <li>请选择1</li>
                                    <li>请选择2</li>
                                    <li>请选择3</li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <input type="text" class="td_inpt" placeholder="备注说明" name="remark5" id="remark5"
                                   value="${data.remark5}"/>
                        </td>
                    </tr>
                </table>
                <div class="ldpj">考核评语</div>
                <textarea rows="4" name="feedback" id="feedback" class="ldpj_textarea">${data.feedback }</textarea>
            </form>
                <%-- <c:if test="${1==1}">--%>
                <div class="btn_row">
                    <button type="button" class="button1" onclick="submitForm()">提交</button>
                    <button type="button" class="button2">重置</button>
                </div>
        </div>
        <div class="bmkhcp_rt">
            <div class="bmkhcp_rt_main">
                <div class="title">考核指标说明</div>
                <div class="bmkhcp_title">共性指标 — <span>德（20分）</span></div>
                <div class="bmkhcp_b"><span class="span1"></span>信念坚定，政治过硬（5分）</div>
                <div class="bmkhcp_p">言行不符合共产党员、人民警察以及厅机关干部身份的，扣2分；未经批准不参加“三会一课”、 集中学习教育等活动的，每次扣0.5分；其他不符合本项要求的，视情扣分。
                </div>
                <div class="bmkhcp_b"><span class="span1"></span>对党忠诚，严守规矩（5分）</div>
                <div class="bmkhcp_p">
                    对组织不忠诚老实，个人有关重大事项不报告的，扣2分；不按规定落实民主集中制、一岗双责责任制的，扣1分；不按组织原则和程序办事，存在不及时报告、越级报告等情况的，扣1分；其他不符合本项要求的，视情扣分。
                </div>
                <div class="bmkhcp_b"><span class="span1"></span>围绕中心，服务大局（5分）</div>
                <div class="bmkhcp_p">落实上级决策部署，主观上不努力，工作推动缓慢的，扣1分；过分看重部门利益、个人利益，与组织讨价还价的，扣1分；其他不符合本项要求的，视情扣分。</div>
                <div class="bmkhcp_b"><span class="span1"></span>对党忠诚，严守规矩（5分）</div>
                <div class="bmkhcp_p">
                    对组织不忠诚老实，个人有关重大事项不报告的，扣2分；不按规定落实民主集中制、一岗双责责任制的，扣1分；不按组织原则和程序办事，存在不及时报告、越级报告等情况的，扣1分；其他不符合本项要求的，视情扣分。
                </div>
            </div>
        </div>
    </div>
</div>
<!--考勤记录弹出框-->
<div class="khjl_pop" id="khjl_pop">
    <table class="table_khjl">
        <tr>
            <th width="20%">上班时间</th>
            <th width="20%">下班时间</th>
            <th width="15%">请假</th>
            <th width="15%">迟到</th>
            <th width="15%">早退</th>
            <th width="15%">缺勤</th>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        <tr>
            <td>2017/10/24 8:14:32</td>
            <td>2017/10/24 18:14:32</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
    </table>
</div>
<!--考勤记录弹出框结束-->
<script type="text/javascript">
    function getContentSize() {
        var ew = document.getElementById("bmkhcp").offsetWidth; //获取id=njga_bottom现在的宽度
        bmkhcp_lf = (ew - 356) + "px";
        document.getElementById("bmkhcp_lf").style.width = bmkhcp_lf;
    }
    window.onload = getContentSize; //页面加载时调用getContentSize()
    window.onresize = getContentSize; //当改变窗口大小时会出发getContentSize()
    $(document).ready(function () {
        //领导评鉴
        $(".ldpj_table_td .inpt_w_l").click(function () {
            $(this).addClass("inpt_w_l_hov");
            $(this).parent(".inpt_w").siblings(".inpt_w").children(".inpt_w_l").removeClass("inpt_w_l_hov");
        });
        //领导评鉴-选择分数
        $(document).click(function () {
            $(".td_select_xl").slideUp(200);
        });
        $(".td_select1").click(function (e) {
            e = e || window.event;
            if (e.stopPropagation) {
                e.stopPropagation();
            } else {
                e.cancelBubble = true;
            }
            $(this).next(".td_select_xl").slideToggle(200);
            $(this).parents("tr").siblings("tr").find(".td_select_xl").hide();
            var selecttext = $(this).children("p");
            var selectmain = $(this).next(".td_select_xl");
            var lis = selectmain.find('li');
            for (var i = 0; i < lis.length; i++) {
                lis[i].onclick = function () {
                    selectmain.hide();
                    var textval = $(this).html();
                    selecttext.text(decodeURIComponent(textval));
                }
            }
        });
        //领导评鉴-选择分数结束
        //考勤记录弹出框
        $("#kqjl").on("click", function () {
            var open = layer.open({
                type: 1,                                    //0（信息框，默认）1（页面层）2（iframe层）3（加载层）4（tips层）。
                shift: 1,//动画    0-6     css3动画
                closeBtn: 1,       //关闭按钮  0 不显示  style  1和2  标题为 false 2
//			 btn: '取消',
                title: ['考勤记录', 'background:#5f9ad1;color:#fff;text-align: left;font-size: 18px;'],
                area: ['860px', 'auto'], //宽高
                content: $("#khjl_pop") //iframe层-禁滚动条  $("#photosDemo").html()   'http://www.baidu.com/'
            });
        });
        //考勤记录弹出框结束

    });
    $(function () {
        if ('${data.ldeaderlevel1}' != '' && '${data.ldeaderlevel1}' != null) {
            selectLevel(1, '${data.ldeaderlevel1}', 1);
            selectLevel(2, '${data.ldeaderlevel2}', 1);
            selectLevel(3, '${data.ldeaderlevel3}', 1);
            selectLevel(4, '${data.ldeaderlevel4}', 1);
            selectLevel(5, '${data.ldeaderlevel5}', 1);
            $("#chooseId1").html("${data.ldeadersocre1}" + "分");
            $("#chooseId2").html("${data.ldeadersocre2}" + "分");
            $("#chooseId3").html("${data.ldeadersocre3}" + "分");
            $("#chooseId4").html("${data.ldeadersocre4}" + "分");
            $("#chooseId5").html("${data.ldeadersocre5}" + "分");
        }
    });

    function selectLevel(id, level, isinit) {
        $("#ldeaderlevel" + id).val(level);
        $("#ldeadersocre" + id).val("");
        // 根据id和level控制显示得分
        $("#td_select_xl" + id).html("");
        var start;
        var end;
        if (id == 1) {
            if (level == 'A') {
                start = ${khymap.Amin0};
                end = ${khymap.Amax0};
            } else if (level == 'B') {
                start = ${khymap.Bmin0};
                end = ${khymap.Bmax0};
            }
            else if (level == 'C') {
                start = ${khymap.Cmin0};
                end = ${khymap.Cmax0};
            } else {
                start = ${khymap.Dmin0};
                end = ${khymap.Dmax0};
            }
        } else if (id == 2) {//15-13分	12-9分	8-6分	5分以下
            if (level == 'A') {
                start = ${khymap.Amin1};
                end = ${khymap.Amax1};
            } else if (level == 'B') {
                start = ${khymap.Bmin1};
                end = ${khymap.Bmax1};
            }
            else if (level == 'C') {
                start = ${khymap.Cmin1};
                end = ${khymap.Cmax1};
            } else {
                start = ${khymap.Dmin1};
                end = ${khymap.Dmax1};
            }
        } else if (id == 3) {//15-13分	12-9分	8-6分	5分以下
            if (level == 'A') {
                start = ${khymap.Amin2};
                end = ${khymap.Amax2};
            } else if (level == 'B') {
                start = ${khymap.Bmin2};
                end = ${khymap.Bmax2};
            }
            else if (level == 'C') {
                start = ${khymap.Cmin2};
                end = ${khymap.Cmax2};
            } else {
                start = ${khymap.Dmin2};
                end = ${khymap.Dmax2};
            }
        } else if (id == 4) {//40-36分	35-25分	24-20分	20分以下
            if (level == 'A') {
                start = ${khymap.Amin3};
                end = ${khymap.Amax3};
            } else if (level == 'B') {
                start = ${khymap.Bmin3};
                end = ${khymap.Bmax3};
            }
            else if (level == 'C') {
                start = ${khymap.Cmin3};
                end = ${khymap.Cmax3};
            } else {
                start = ${khymap.Dmin3};
                end = ${khymap.Dmax3};
            }
        }
        else if (id == 5) {//10-9分	8-7分	6-5分	4分以下
            if (level == 'A') {
                start = ${khymap.Amin4};
                end = ${khymap.Amax4};
            } else if (level == 'B') {
                start = ${khymap.Bmin4};
                end = ${khymap.Bmax4};
            }
            else if (level == 'C') {
                start = ${khymap.Cmin4};
                end = ${khymap.Cmax4};
            } else {
                start = ${khymap.Dmin4};
                end = ${khymap.Dmax4};
            }
        }
        $("#chooseId" + id).html("请选择");
        for (var i = start; i <= end; i++) {
            $("#td_select_xl" + id).append("<li>" + i + "分</li>");
        }
        if (isinit != 1 && (level == 'C' || level == 'D')&& $("#remark" + id).val() == "") {
            showMessage('请备注说明原因！');
        }
    }

    function submitForm() {
        if (validateForm()) {
            //top.mask();
            $("#submit_form").ajaxSubmit({
                type: "post",
                dataType: "json",
                success: function (data) {
                    //top.unmask();
                    if (data.data.status == 1) {
                        showMessage('操作成功！');
                        window.setTimeout(function () {
                            var url = "<c:url value='/evaluation/ldpj_list/@.html'/>".replace("@","${type }");
                            $('#ifrm_data', parent.document).attr("src", url);
                        }, 2000);
                    } else {
                        showMessage(data.data.body);
                    }
                },
                error: function () {
                    // top.unmask();
                    showMessage("新增失败！");
                }
            });
        }
    }

    function validateForm() {
        for (var i = 1; i < 6; i++) {
            if ($("#ldeaderlevel" + i).val() == "" || $("#ldeaderlevel" + i).val() == null) {
                showMessage('请选择等级！');
                return false;
            } else {
                if (($("#ldeaderlevel" + i).val() == "C" || $("#ldeaderlevel" + i).val() == "D") && $("#remark" + i).val() == "") {
                    showMessage('请备注说明原因！');
                    return false;
                }
            }
            if ($("#chooseId" + i).html() == "" || $("#chooseId" + i).html() == null || $("#chooseId" + i).html() == "请选择") {
                showMessage('请打分！');
                return false;
            } else {
                $("#ldeadersocre" + i).val($("#chooseId" + i).html().replace("分", ""));
            }
        }
        if ($("#feedback").val() == "" || $("#feedback").val() == null) {
            showMessage('请填写考核评语！');
            return false;
        }
        $("#totalscore").val(parseInt($("#ldeadersocre1").val()) + parseInt($("#ldeadersocre2").val()) + parseInt($("#ldeadersocre3").val()) + parseInt($("#ldeadersocre4").val()) + parseInt($("#ldeadersocre5").val()));
        return true;
    }
    function showMessage(content) {
        layer.open({
            title: '信息'
            , content: content
        });
    }
</script>
</body>


</html>